package com.zjcode.cdcer.service.fallback;

import com.chinatechstar.component.commons.result.ListResult;
import com.chinatechstar.component.commons.result.ResultBuilder;
import com.chinatechstar.component.commons.supports.PageData;
import com.zjcode.cdcer.model.basic.JsonObj;
import com.zjcode.cdcer.service.SystemInitService;
import org.springframework.stereotype.Service;

/**
 * @ClassName:SystemInitServiceFallBack
 * @功能：
 * @author：wlei
 * @日期：2022/7/10-04:16
 **/
@Service
public class SystemInitServiceFallBack implements SystemInitService {

    @Override
    public JsonObj sayHi(String message) {
        return JsonObj.error("系统初始服务异常");
    }

    @Override
    public ListResult<Object> listByPage(PageData pageData) {
        return ResultBuilder.buildListWarn(new Exception("系统初始服务异常"));
    }

    @Override
    public JsonObj execInsert(PageData pageData) {
        return JsonObj.error("系统初始服务异常");
    }

    @Override
    public JsonObj execSelect(PageData pageData) {
        return JsonObj.error("系统初始服务异常");
    }

    @Override
    public ListResult<Object> testData(PageData pageData) {
        return ResultBuilder.buildListWarn(new Exception("系统初始服务异常"));
    }
}
